<?php
	class Export_form_model extends CI_Model {
	    
    var $id;
	var $storage_id;    	
    var $maker;    
	var $note;    
    var $quantity;
    var $date_created;
    var $active;

    function __construct()
    {
        // Call the Model constructor
        parent::__construct();
    }

    // load all Storage
    function loadAll()
    {
        $query = $this->db->get('export_form');
        return $query->result();
    }    

    function getEntry($id)
    {
        $query = $this->db->get_where('export_form', array('id' => $id));
        return $query->row();
    }    

    function getInactiveExportForm()
    {
        $query = $this->db->get_where('export_form', array('active' => '0'));
        return $query->row();
    }

    function insert($data)
    {
        $this->db->insert('export_form',$data);
        return $this->db->insert_id();
    }

    function update($data,$exportForm)
    {
        $this->db->where('id', $exportForm);
        $this->db->update('export_form', $data); 
    }
}